package com.huyaanalysisplatform.controller;


import com.huyaanalysisplatform.service.TFanService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
import com.huyaanalysisplatform.controller.BaseController;

import javax.servlet.http.HttpServletRequest;
import java.util.HashMap;
import java.util.Map;

/**
 * <p>
 * 前端控制器
 * </p>
 *
 * @author Huadi Group 12
 * @since 2021-08-01
 */
@RestController
@RequestMapping("/home")
@CrossOrigin
public class TFanController extends BaseController {
    @Autowired
    TFanService tFanService;
    @RequestMapping({"/function15/fans"})//功能15
    @ResponseBody
    public Map queryFourthHot(HttpServletRequest httpRequest) {
        Long roomNumber = Long.parseLong(httpRequest.getParameter("roomNumber"));
        Map map = new HashMap<String, Long>();
        map.put("roomNumber", roomNumber);
        map = tFanService.queryFans(map);
        return map;
    }

}
